﻿@model UniTax.Models.TaxiModel

<h3>Вы действительно хотите удалить данную службу такси из базы</h3>
<table style="width: 100%" class="table hovertable">
    <tr>
        <td style="width: 200px"></td>
        <td></td>
    </tr>

    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <td>
            @Html.DisplayFor(model => model.Name)
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.TownId)
        </th>
        <td>
            @Html.DisplayFor(model => model.TownId)
        </td>
    </tr>
    <tr>
        <th>Телефоны
        </th>
        <td>
            @foreach (var phone in Model.Phones)
            {
                <p>@phone.Phone1</p>
            }
        </td>
    </tr>
    <tr>
        <th>Контактные телефоны
        </th>
        <td>
            @foreach (var phone in Model.ContactPhones)
            {
                <p>@phone.Phone</p>
            }
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.ContactName)
        </th>
        <td>
            @Html.DisplayFor(model => model.ContactName)
        </td>
    </tr>
    <tr>
        <th>Функции
        </th>
        <td>
            @foreach (var func in Model.Functions)
            {
                <p>@func.Name</p>
            }
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.License)
        </th>
        <td>
            @Html.DisplayFor(model => model.License)
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Logo)
        </th>
        <td>
            @Html.DisplayFor(model => model.Logo)
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Raiting)
        </th>
        <td>
            @Html.DisplayFor(model => model.Raiting)
        </td>
    </tr>
</table>

@using (Ajax.BeginForm(new AjaxOptions
{
    UpdateTargetId = "ajaxContainer",
    OnBegin = "showWaitDiv",
    OnSuccess = "hideWaitDiv"
}))
{
    @Html.AntiForgeryToken()
    <p>
        <input type="submit" value="Удалить" />
        |
        @Ajax.ActionLink("Назад к списку такси", "TaxiList", new { id = Model.TownId }, new AjaxOptions
{
    UpdateTargetId = "ajaxContainer",
    OnBegin = "showWaitDiv",
    OnSuccess = "hideWaitDiv"
})
    </p>
}
